import { createStore } from 'vuex';

const moduleA = {
  namespaced: true,
  state: {
    name: 'ww',
  },
  getters: {
    getName(state) {
      return state.name;
    },
  },
  mutations: {
    updataName(state) {
      state.name = 'wyp';
    },
  },
  actions: {
    updataName(context) {
      context.commit('updataName');
    },
  },
};
export default createStore({
  modules: {
    moduleA,
  },
});
